#define _CRT_SECURE_NO_WARNINGS




#include<iostream>
using namespace std;
const int N = 1010;
int n, m;
int x, y;
char a[N][N];
int dfs1()
{
    int p = 0;
    for (int i = 1; i < y; i++)
    {
        if (a[x][i] == '*')
        {
            p = i;
            return y - p;
        }
    }
    for (int j = y + 1; j <= m; j++)
    {
        if (a[x][j] == '*')
        {
            p = j;
            return y - p;
        }
    }
    return y - p;
}
int dfs2()
{
    int p = 0;
    for (int i = 1; i < x; i++)
    {
        if (a[i][y] == '*')
        {
            p = i;
            return p - x;
        }
    }
    for (int j = x + 1; j <= n; j++)
    {
        if (a[j][y] == '*')
        {
            p = j;
            return p - x;
        }
    }
    return p - x;
}
int main()
{
    cin >> n >> m;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
            cin >> a[i][j];
    }

    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            if (a[i][j] == '#')
            {
                x = i;
                y = j;
                goto tab;
            }
        }
    }
tab:
    int ansx = dfs1();
    int ansy = dfs2();
    cout << ansx << " " << ansy;
    return 0;
}

